/**
 * 
 */
package com.baijia.tianxiao.connect.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;

import com.baijia.tianxiao.connect.handler.TianxiaoWebSocketHandler;
import com.baijia.tianxiao.connect.interceptor.TianxiaoAppWebSocketHandshakeInterceptor;

/**
 * @author leiruiqi
 *
 * 无效代码，使用spring xml 配置，此文件废弃
 */

//@Configuration  

//@EnableWebSocket
public class TianxiaoWebSocketConfig extends WebMvcConfigurerAdapter implements WebMvcConfigurer{

	public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
		registry.addHandler(new TianxiaoWebSocketHandler(), "/tx-test").addInterceptors(new TianxiaoAppWebSocketHandshakeInterceptor());  
		
	
	}

}
